home *** CD-ROM | disk | FTP | other *** search
/ Know Your Hockey - The Greatest Player Resource / Know Your Hockey: The Greatest Player Resource.iso / hockey / director / ktgcst.cst / 00062_Script_buttons scripts Roles < prev    next >
Text File  |  1998-09-28  |  5KB  |  164 lines

  1.  
  2. on ThreeStateplayersoff10
  3.   set mybutton = the clickon-10
  4.   set player = the clickon+10
  5.   set one = getat(gbuttonState, player)
  6.   if one = 0 then 
  7.     set e = the membernum of sprite mybutton+1
  8.     set f = the membernum of sprite player+1
  9.     set the membernum of sprite mybutton = member e of castlib "internal"
  10.     set the membernum of sprite player = member f of castlib "internal" 
  11.     setat(gbuttonState, mybutton,2) 
  12.     setat(gbuttonState, player,2)
  13.   end if
  14.   loadAudioMedia(player)
  15. end
  16.  
  17.  
  18. on resetplayersoff10
  19.   set mybutton = the clickon+10
  20.   repeat with y = 31 down to 25
  21.     set thisone = getat(gbuttonState,y)
  22.     if thisone > 0 and y <> mybutton then 
  23.       set player = y-20
  24.       set e = the membernum of sprite y-1
  25.       set f = the membernum of sprite player-1
  26.       set the blend of sprite y = 0
  27.       set the blend of sprite y-20 = 0
  28.       set the membernum of sprite y = member e of castlib "internal"
  29.       setat(gbuttonState,y,0)
  30.       if the membernum of sprite player = 0 then exit
  31.       set the membernum of sprite player = member f of castlib "internal"
  32.       setat(gbuttonState,player,0)
  33.       exit repeat
  34.     end if
  35.   end repeat 
  36.   updatestage 
  37. end
  38.  
  39. ------------------------------------
  40.  
  41. on ThreeStateplayersoff16
  42.   set mybutton = the clickon-16
  43.   set player = the clickon+4
  44.   set one = getat(gbuttonState, player)
  45.   if one = 0 then 
  46.     set e = the membernum of sprite mybutton+1
  47.     set f = the membernum of sprite player+1
  48.     set the membernum of sprite mybutton = member e of castlib "internal"
  49.     set the membernum of sprite player = member f of castlib "internal" 
  50.     setat(gbuttonState, mybutton,2) 
  51.     setat(gbuttonState, player,2)
  52.   end if
  53.   loadAudioMedia(player)
  54. end
  55.  
  56.  
  57. on resetplayersoff16
  58.   set mybutton = the clickon+4
  59.   repeat with y = 31 down to 25
  60.     set thisone = getat(gbuttonState,y)
  61.     if thisone > 0 and y <> mybutton then 
  62.       set player = y-20
  63.       set e = the membernum of sprite y-1
  64.       set f = the membernum of sprite player-1
  65.       set the blend of sprite y = 0
  66.       set the blend of sprite y-20 = 0
  67.       set the membernum of sprite y = member e of castlib "internal"
  68.       set the membernum of sprite player = member f of castlib "internal"
  69.       setat(gbuttonState,y,0)
  70.       setat(gbuttonState,player,0)
  71.       exit repeat
  72.     end if
  73.   end repeat 
  74.   updatestage 
  75. end
  76.  
  77.  
  78. on ThreeStateplayersoff14
  79.   set mybutton = the clickon-14
  80.   set player = the clickon+6
  81.   set one = getat(gbuttonState, player)
  82.   if one = 0 then 
  83.     set e = the membernum of sprite mybutton+1
  84.     set f = the membernum of sprite player+1
  85.     set the membernum of sprite mybutton = member e of castlib "internal"
  86.     set the membernum of sprite player = member f of castlib "internal" 
  87.     setat(gbuttonState, mybutton,2) 
  88.     setat(gbuttonState, player,2)
  89.   end if
  90.   loadAudioMedia(player)
  91. end
  92.  
  93.  
  94. on resetplayersoff14
  95.   set mybutton = the clickon+6
  96.   repeat with y = 31 down to 25
  97.     set thisone = getat(gbuttonState,y)
  98.     if thisone > 0 and y <> mybutton then 
  99.       set player = y-20
  100.       set e = the membernum of sprite y-1
  101.       set f = the membernum of sprite player-1
  102.       set the blend of sprite y = 0
  103.       set the blend of sprite y-20 = 0
  104.       set the membernum of sprite y = member e of castlib "internal"
  105.       set the membernum of sprite player = member f of castlib "internal"
  106.       setat(gbuttonState,y,0)
  107.       setat(gbuttonState,player,0)
  108.       exit repeat
  109.     end if
  110.   end repeat 
  111.   updatestage 
  112. end
  113.  
  114. global thingon
  115.  
  116. on ThreeStateplayersoffbt bt,bp
  117.   
  118.   resetplayersoffbt bt,bp
  119.   
  120.   set mybutton = the clickon+bt
  121.   set player = the clickon+bp
  122.   set one = getat(gbuttonState, player)
  123.   
  124.   if one = 0 then 
  125.     set thingon = []
  126.     append thingon,the mousecast
  127.     append thingon,the clickon
  128.     set offsetsprite = the clickon + 20
  129.     set offsetcast = the membernum of sprite offsetsprite
  130.     append thingon,offsetcast
  131.     append thingon,offsetsprite
  132.     put thingon
  133.     set e = the membernum of sprite mybutton+1
  134.     set f = the membernum of sprite player+1
  135.     set the membernum of sprite mybutton = member e of castlib "internal"
  136.     set the membernum of sprite player = member f of castlib "internal" 
  137.     setat(gbuttonState, mybutton,2)
  138.     setat(gbuttonState, player,2)
  139.     updatestage
  140.   end if
  141. loadAudioMedia(mybutton)
  142. end
  143.  
  144. on resetplayersoffbt bt,bp
  145.  
  146.     set mybutton = the clickon+bt
  147.     set player = the clickon+bp
  148.     repeat with y = 31 down to 23
  149.       set thisone = getat(gbuttonState,y)
  150.       if thisone > 0 and y <> mybutton then 
  151.         set player = y-20
  152.         set e = the membernum of sprite y-1
  153.         set f = the membernum of sprite player-1
  154.         set the blend of sprite y = 0
  155.         set the blend of sprite y-20 = 0
  156.         set the membernum of sprite y = member e of castlib "internal"
  157.         set the membernum of sprite player = member f of castlib "internal"
  158.         updatestage
  159.         setat(gbuttonState,y,0)
  160.         setat(gbuttonState,player,0)
  161.         exit repeat
  162.       end if
  163.     end repeat  
  164. end